<?php
/**
 * Created by PhpStorm.
 * User: zd
 * Date: 2019/1/26
 * Time: 09:23
 */

namespace app\api\service;


class WorkMessage
{
    //企业微信推送属性
    protected $touser;
    protected $toparty;
    protected $totag;
    protected $msgtype;
    protected $agentid;
    protected $text;
    protected $safe;

    /**
     * @param $info
     * @return bool|mixed
     */
    public function TextMessage($info){
        $pagrams=[
            "touser"=>$this->touser,
            "toparty"=>$this->toparty,
            "totag" =>$this->totag,
            "msgtype"=>$this->msgtype,
            "agentid"=>$this->agentid,
            "text" =>[
                    "content" =>$this->text,
            ],
           "safe"=>$this->safe
        ];

       $ai = new WorkAI();
       $result =  $ai->deliveryMessage($info,$pagrams);

       return $result;
    }

}